\\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
// Please mail any bug reports/comments to the above address with a subject
\\ header of MCF.AMIRX.
//
\\ ** What to do with this file?
// Put this script in REXX: It will be used by MCF.AMIRX.
\\
// What else to do with this file.
\\ Type /Rx MCF_MDO in the channel you wish to perform a Mass De-OP.
// or add Alias: MDO /Rx MCF_MDO
*/
;arg MCFenv MyNick Unick CurCh junk Rnick junk;OPTIONS RESULTS;if MCFenv ~="" then;address value(MCFenv);else MCFenv=address();xl=pos(".",MCFenv)+1;Client=substr(McFenv,xl);OCC="OPCHAR."||Client;OPChar=getclip(value(OCC));if MyNick="" then signal Master;CName=CurCh||"."||Client;ChUs=getclip(value(CName));signal DoIt;Master:;getchannel;CurCh=result;getmynick;MyNick=upper(result);RNick=MyNick;getusers;ChUs=upper(result)||" ";Unick=MyNick;DoIt:;userhost Unick;IPAddr=upper(result);atpos=pos("@",IPAddr)+1;IPAddr=substr(IPAddr,atpos);userhost MyNick;MyIP=upper(result);atpos=pos("@",MyIP)+1;MyIP=substr(MyIP,atpos);lcnt=1;dcnt=0;dline.1="";do cntr=1 by 1 until ChUs="";parse value ChUs with user ChUs;if 0 ~=pos(MyNick,user) then iterate;if 0=pos(OPChar,user) then iterate;tuser=substr(user,2);if Unick=tuser then iterate;user=substr(user,2);userhost user;HisIP=upper(result);atpos=pos("@",HisIP)+1;HisIP=substr(HisIP,atpos);if HisIP=MyIP then;if MyIP ~=IPAddr then iterate;dcnt= dcnt+1;dline.lcnt= dline.lcnt user;if dcnt=4 then;do;dcnt=0;lcnt=lcnt+1;dline.lcnt="";end;end cntr;if dline.1="" then exit;do cnt=1 by 1 until cnt=lcnt;"say /deop "CurCh dline.cnt;end cnt;exit